package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 摇号公示表
 *
 * @author wangt
 * @since 2024-06-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_lottery_announcement")
@Schema(name = "EduLotteryAnnouncement", title = "摇号公示表", description = "摇号公示表实体类")
public class EduLotteryAnnouncement extends Model<EduLotteryAnnouncement> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "lotteryAnnouncementId", description = "摇号公示id")
    @TableId(value = "lottery_announcement_id", type = IdType.ASSIGN_ID)
    private Long lotteryAnnouncementId;

    @Schema(name = "year", description = "年份")
    @TableField(value = "year")
    private Integer year;

    @Schema(name = "title", description = "标题")
    @TableField(value = "title")
    private String title;

    @Schema(name = "status", description = "状态 1 显示 0 隐藏")
    @TableField(value = "status")
    private String status;

    @Schema(name = "schoolId", description = "所属学校id")
    @TableField(value = "school_id")
    private String schoolId;

    @Schema(name = "schoolName", description = "所属学校名称")
    @TableField(value = "school_name")
    private String schoolName;

    @Schema(name = "areaCode", description = "行政区划")
    @TableField(value = "area_code")
    private String areaCode;

    @Schema(name = "remark", description = "备注")
    @TableField(value = "remark")
    private String remark;

    @Schema(name = "createName", description = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", description = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "del", description = "0,未删除,1,已删除")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Override
    public Serializable pkVal() {
        return this.lotteryAnnouncementId;
    }
}
